package cn.com.servyou.controller;

import cn.com.servyou.model.vo.ReturnPageDataVo;
import cn.com.servyou.model.vo.UserInfoVo;
import cn.com.servyou.services.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
public class LoginController {

    @Autowired
    LoginService loginService;

    @RequestMapping(value = "loginUser", method = {RequestMethod.POST, RequestMethod.GET})
    @ResponseBody
    public ReturnPageDataVo loginUser(UserInfoVo loginInfo){
        return loginService.login(loginInfo.getUser_name(),loginInfo.getUser_pass());
    }
}
